<?php
require_once ('scripts.php');

class VehicleService
{

	public function deleteImageByID($imageid) 
	{
      	$delResult = VehicleDAOImpl::getInstance()->deleteImage($imageid);
		return true;
    }

    public function getVehicleByPageIndex($vehicleRequest) 
	{
      	$result_vehicle = VehicleDAOImpl::getInstance()->getVehicleByPageIndex($vehicleRequest);
		return $result_vehicle;
    }
	
	public function updateVehicleByVehicleID($vehicle,$isNormal) 
	{
      	$result = VehicleDAOImpl::getInstance()->updateVehicleByVehicleID($vehicle, $isNormal);
		return $result;
    }
	
	public function createNewVehicle($vehicle) 
	{
      	$result = VehicleDAOImpl::getInstance()->createNewVehicle($vehicle);
		return $result;
    }
	
	public function updateVehicleStatusByVehicleID($vehicleID) 
	{
      	$result = VehicleDAOImpl::getInstance()->getData($request);
		return $result;
    }
	
	public function addNewLog() 
	{
      	$result = VehicleDAOImpl::getInstance()->getData();
		return $result;
    }
    
	public function updateVehicleFieldByID($vehicleId, $fieldName, $value, $admin)
	{
		$result = VehicleDAOImpl::getInstance()->updateVehicleFieldByID($vehicleId, $fieldName, $value, null,null,$admin);
		return $result;
	}
    
	public function updateMessageVehicleID($messages, $colName, $reply, $doMail, $update) 
	{
      	$result = VehicleDAOImpl::getInstance()->updateMessageVehicleID($messages, $colName, $reply, $doMail, $update);
		return $result;
    }
    
    public function getVehicleCount()
	{
		$result = VehicleDAOImpl::getInstance()->getVehicleCount();
		return $result;
	}
	
	public function getBidVehicleDetails($vehicle_key)
	{
		$result = VehicleDAOImpl::getInstance()->getBidVehicleDetails($vehicle_key);
		return $result;
	}

	public function getVehicleByVehicleID($vehicle_key)
	{
		$result = VehicleDAOImpl::getInstance()->getVehicleByVehicleID($vehicle_key);
		return $result;
	}

	public function getAllLockedVehicle()
	{
		$result = VehicleDAOImpl::getInstance()->getAllLockedVehicle();
		return $result;
	}
	
	public function confirmVehicleLockByID($vehicle_id, $adminName,$adminId)
	{
		$result = VehicleDAOImpl::getInstance()->confirmVehicleLockByID($vehicle_id, $adminName,$adminId);
		return $result;
	}
	
	public function unlockVehicleByID($vehicle_id)
	{
		$result = VehicleDAOImpl::getInstance()->unlockVehicleByID($vehicle_id);
		return $result;
	}

	public function addNewPrivateNote($messageVO)
	{
		$result = VehicleDAOImpl::getInstance()->addNewPrivateNote($messageVO);
		return $result;
	}
	
	public function vehicleShareByEmail($shareVO)
	{
		$result = VehicleDAOImpl::getInstance()->vehicleShareByEmail($shareVO);
		return $result;
	}
	
	public function shareByUnknownEmail($shareVO)
	{
		$result = VehicleDAOImpl::getInstance()->shareByUnknownEmail($shareVO);
		return $result;
	}
	
	public function getPartnerList()
	{
		$result = VehicleDAOImpl::getInstance()->getPartnerList();
		return $result;
	}
	
	public function getShareDetails($vehicle_key)
	{
		$result = VehicleDAOImpl::getInstance()->getShareDetails($vehicle_key);
		return $result;
	}
	
	public function createNewPartner($partner)
	{
		$result = VehicleDAOImpl::getInstance()->createNewPartner($partner);
		return $result;
	}
	public function getSubmissionReport($from, $to)
	{
		$result = VehicleDAOImpl::getInstance()->getSubmissionReport($from, $to);
		return $result;
	}
	
	public function getUnknownShareDetails($vehicle_key)
	{
		$result = VehicleDAOImpl::getInstance()->getUnknownShareDetails($vehicle_key);
		return $result;
	}
	
	public function setWatchList($watchList)
	{
		$result = VehicleDAOImpl::getInstance()->setWatchList($watchList);
		return $result;
	}
	
	public function updateWatchList($watchList)
	{
		$result = VehicleDAOImpl::getInstance()->updateWatchList($watchList);
		return $result;
	}
	public function removeWatchlist($watchList)
	{
		$result = VehicleDAOImpl::getInstance()->removeWatchlist($watchList);
		return $result;
	}
	
	public function createNewTower($tower)
	{
		$result = VehicleDAOImpl::getInstance()->createNewTower($tower);
		return $result;
	}
	
	public function getReminderList()
	{
		$result = VehicleDAOImpl::getInstance()->getReminderList();
		return $result;
	}
	
	public function getReminderVO($vid)
	{
		$result = VehicleDAOImpl::getInstance()->getReminderVO($vid);
		return $result;
	}
}
?>